function localUrl(url) {
  return `apis/mdm/${url}`;
}
const API = {
  findApplicationPage: param => {
    return $http.post(`apis/mgt/application/findApplicationPage`, param).then(response => response.data);
  },
  // 查询开启主数据的应用列表
  getOpenMainAppList: param => {
    return $http.get(localUrl(`setting/get/appList/${param.tenantCode}`), param).then(response => response.data);
  },
  getOrgTree: param => {
    return $http.post(localUrl(`org/orgTree`), param).then(response => response.data);
  },
  getDetail: param => {
    return $http.post(localUrl(`org/detail`), param).then(response => response.data);
  },
  getFieldList: param => {
    return $http
      .post(localUrl(`org/fieldList/${param.tenantCode}/${param.applicationCode}`), param)
      .then(response => response.data);
  },
};
export default API;
